/* author: Mariana Horita
   mariana.horita@gmail.com
   file: AddClasse.cs*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace K_Vizinhos
{
    public partial class AddClasse : Form
    {
        
        public string Nome { get { return txtInforme.Text; } }


        private Color cor = Color.White;
        public Color Cor { get { return cor; } }
        public string[] classes;

        public AddClasse(string[] classes)
        {
            InitializeComponent();
            this.classes = classes;
        }

        private void btCor_Click(object sender, EventArgs e)
        {
            colorDialog1.ShowDialog();
            btCor.BackColor = colorDialog1.Color;
            this.cor = colorDialog1.Color;
        }

        private void txtInforme_TextChanged(object sender, EventArgs e)
        {
            btAdicionar.Enabled = txtInforme.Text.Trim().Length > 0 && !classes.Contains(txtInforme.Text);
        }
    }
}
